package main 
{
	import assists.URI;
	
	import inerface.IMessage;

	/**
	 * ...
	 * @author clouree
	 */
	public class DataSubBase extends SuperSubBase
	{
		private var _data:DataManager;
		public function DataSubBase() 
		{
		}
		
		override public function initComponents(value:SuperBase):void
		{
			if (!value)
			{
			 trace("传入组件为空");
			 return;
			}
			_data = value as DataManager;
			this.registeredListener();
		}
		
		/*这里写具体的侦听函数，创建新data之后自动调用此函数*/
		protected function registeredListener():void
		{
			
		}
		
		public function send(message:IMessage):void
		{
			_data.send(message);
		}
		
		public function registerMessageHandler(messageId:uint,callBack:Function):void
		{
			_data.registerMessageHandler(messageId,callBack)
		}
		
		public function cancelMessageHandler(messageId:uint,callBack:Function):void
		{
			_data.cancelMessageHandler(messageId,callBack);
		}
		
		protected function get xmlLoader():XMLLoaderManager
		{
			return _data.xmlLoaderManager;
		}
		
		protected function get data():DataManager
		{
			return _data;
		}
		
	}

}